package com.gx.components
{

	import com.gx.events.TransformEvent;
	import com.gx.interfaces.IBitmapObject;
	import com.gx.interfaces.IDrawable;
	import com.gx.interfaces.ISceneObject;
	
	import flash.display.Bitmap;
	import flash.geom.Rectangle;
	import flash.geom.Transform;
	
	

	public class StaticSprite extends SceneObject implements ISceneObject, IBitmapObject, IDrawable
	{
		public function StaticSprite()
		{
			super();
			
		}
		
		public function render(layer:Bitmap):void
		{
			layer.bitmapData.copyPixels(_bitmap.bitmapData, clip, position, null, null, true);
			
		}
		
		
		
		private var _clip:Rectangle;
		public function get clip():Rectangle{return _clip;}
		public function set clip(value:Rectangle):void
		{
			_clip = value;
		}
		
		private var _width:int;
		override public function get width():Number{return clip.width;}
		override public function set width(value:Number):void{clip.width = value};
		
		private var _height:int;
		override public function get height():Number{return clip.height;}
		override public function set height(value:Number):void{clip.height = value;}
		
		
		private var _bitmap:Bitmap = new Bitmap();
		public function get bitmap():Bitmap
		{
			return _bitmap;
		}
		
		public function set bitmap(value:Bitmap):void
		{
			_bitmap = value;
		}
		
	}
}